package com.example.medicine.Mapper.yian;


import com.example.medicine.Bean.yian.yian_jibing;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface yian_jibingMapper {
    @Select("select * from [yian_jibing]")
    public List<yian_jibing> getAll();
    @Select("select * from [yian_jibing] where yianid=#{yianid}")
    public List<yian_jibing> getByYianId(long yianid);

    @Insert("insert into [yian_jibing](yianid,mingcheng,fenglei) values(#{yianid},#{mingcheng},#{fenglei})")
    @Options(useGeneratedKeys = true,keyProperty = "id",keyColumn = "id")
    public void insertOne(yian_jibing yian_jibing);

    @Delete("delete from [yian_jibing] where yianid=#{yianid}")
    public void deleteByYianId(long yianid);
}
